<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
		<meta charset="utf-8">
		<title>淘天机站群系统管理后台</title>
		<!-- include header_meta -->
</head>

<body>
	<!-- include header -->
	<div class="cp-wrap {if $jnarrow}jnarrow{/if}">
		<div class="crumb">
		</div>
		<div class="cp-table">
			<div id="container"></div>
		</div>
		<div id="datalist"></div>
	</div>
	<!-- include footer -->

	<style type="text/css">
		#container {
			height: 300px;
		}
	</style>
	
	<script type="text/javascript">
		$(function() {
			var dategroup = [];
			<!-- foreach $spider_types $flag $spiderName -->
			var {$flag} = [];
			<!--/foreach-->

			<!-- foreach $list_count -->
			dategroup.push({$adddate});
			<!-- foreach $spider_types $flag $spiderName -->
			{$flag}.push({$$flag});
			<!--/foreach-->
			<!--/foreach-->

			var series_data = [];
			<!-- foreach $spider_types $flag $spiderName -->
			series_data.push({ name: '{$spiderName}', data: {$flag} });
			<!--/foreach-->

			$('#container').highcharts({
				chart: {
					backgroundColor: '#F1F3F6'
				},
				credits: {
					enabled: false
				},
				tooltip: {
					crosshairs: true,
					shared: true,
					valueSuffix: ''
				},
				title: {
					text: '搜索引擎抓取量统计',
				},
				xAxis: {
					categories: dategroup
				},
				yAxis: {
					title: {
						text: '抓取次数'
					},
					plotLines: [{
						value: 0,
						width: 1,
						color: '#808080'
					}]
				},
				tooltip: {
					valueSuffix: '次'
				},
				legend: {
					layout: 'vertical',
					align: 'right',
					verticalAlign: 'middle',
					borderWidth: 0
				},
				series: series_data
			});
		});

	</script>

	<script>
		$("#datalist").load("?m=spider&a=spider_list&yuming_id={$yuming_id}");
		$(document).on('click', ".cp-pages a", function() {
			$("#datalist").load($(this).prop("href"));
			return false;
		});
		$(document).on('change', "#curhour", function(){
			$("#datalist").load('?m=spider&a=spider_list&yuming_id={$yuming_id}&hour='+$(this).val());
			return false;
		});
	</script>
	
</body>

</html>
